// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
import {Gardener, GardenerView, IGardenerView} from "../gardener/GameGardener"

@ccclass
export default class DemoViewController extends GardenerView implements IGardenerView {

    @property(cc.Label)
    lbTest: cc.Label = null;

    // onLoad () {},

    start () {

    }

    // update (dt) {},

    onBtnScene2_Tap(){
        Gardener.loadView(GardenerConfig.PrefabScene.P_HOME_SCENE,(scene)=>{
            scene && Gardener.openView(cc.instantiate(scene), true);
        });
    }

    onBtnPyramid() {
        // var rtn = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "show", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "6_0", "pyramid");
        // this.lbTest.string = rtn
    }

    onBtnCatrun() {
        // var rtn = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "show", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "7_0", "catrun");
        // this.lbTest.string = rtn
    }

    onBtnProtraitDemo() {
        // var rtn = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "show", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "7_0", "demo_portrait");
        // this.lbTest.string = rtn
    }

    display(){

    }

    dispose(){

    }
}
